The Web Resource Upload Utility streamlines the task of uploading several files as Web Resources into Microsoft Dynamics CRM in a consistent manner.
Application: WebResourceUtility.exe
Solution: In the CRM SDK, the Visual Studio solution for this application is under \SDK\Tools\WebResourceUtility. See the file Readme.docx that Microsoft includes with this utility. The information on this wiki page provides supplementary details.
The application is divided into three tabs (pages): Connections, Solutions and Web Resource Packages. (Note: It's best to maximize the main window of the utility in order to see all of the buttons, some of which appear at a fixed location at the bottom of the screen.)
Connections Tab
Connect to an existing Connection or create a new one.
Connect to a CRM Online (Office 365) organization
See section "Fix: Connecting to Dynamics CRM 2013 Online (Office 365)" below for a change needed in the Web Resource application to support CRM Online. Follow those steps if your version of the utility cannot connect to CRM Online.
Name: Enter a name that describes the connection and/or organization Server: crm.dynamics.com Organization: Obtain this value from CRM Online. Go to Settings >> Customizations >> Developer Resources and use the "Organization Unique Name". Username: Provide the user name for a CRM user that has the administrator or customizer role Domain: Leave this blank Password: You are prompted to enter the password for the specified username
Solutions Tab
Choose a Dynamics CRM Unmanaged Solution.
Select the Solution to which the Web Resources you upload will be associated.
If necessary, create a new Solution (in the CRM UI) for grouping the Web Resources you are working on. Add any existing Web Resources to the Solution that you intend to modify and update. If you create a new solution, return to the Connections tab and log in again to refresh the list of solutions.
Click the "Choose" button at the bottom of the list.
Web Resource Packages Tab
Load an existing package or create a new one.
This screen lists existing "packages", if any. A package is a grouping of Web Resources and various settings.
Package Name: If it makes sense for your work, enter the same name as the Solution you selected on the Solutions tab, or a different name that describes the grouping of Web Resources. Note that you cannot enter spaces or dashes.
Root Path: Select the path where the Web Resource files reside on disk.
The "File Search" section lists files that are in the specified root path. This section allows you to find and select the files that you want to upload to CRM. Use the Add Files to Web Resources button to copy selected files to the list in the Web Resources section.
The "Web Resources" section provides a table of the Web Resources that you wish to create or update in CRM. Note the value for "Web Resource name prefix" -- be sure that prefix is what you expect.
For each file listed in the grid in the Web Resources section, set the following:
Name (editable): Specify the virtual path and file name for the Web Resource. Example: /Common/MyCommonFunctions.js. Do not include the prefix for the Solution Publisher (e.g., "new_"), the tool will prepend this prefix for you. If you intend to update existing Web Resources then be sure that this name exactly matches the name of the existing Web Resource, otherwise the utility will create another copy of the Web Resource with the new name.
Display Name (editable)
Description (editable)
Fix: Connecting to Dynamics CRM Online (Office 365)
keywords: connect connection connections
The Web Resource Upload Utility code provided by Microsoft (up to and including the May 2014 SDK release) has CRM connectivity code that does not work with Dynamics CRM Online when provisioned with Microsoft Office 365. To resolve that issue you can change code in the project as shown below:
Class: public class ConsolelessServerConnection
**Change this:**
config.EndpointType = AuthenticationProviderType.LiveId;
config.DiscoveryUri =
new Uri(String.Format("https://dev.{0}/XRMServices/2011/Discovery.svc", config.ServerAddress));
config.DeviceCredentials = GetDeviceCredentials();
**To this:**
config.EndpointType = AuthenticationProviderType.OnlineFederation;
config.DiscoveryUri =
new Uri(String.Format("https://disco.{0}/XRMServices/2011/Discovery.svc", config.ServerAddress));
//config.DeviceCredentials = GetDeviceCredentials();
Alternative approach:
1) Open class file ConsolelessServerConnection. Change the first IF statement at the top of method GetServerConfiguration to what's shown below.
2) Build and run the Web Resource utility.
3) In the field that prompts for the server, include the entire Discovery service URL for your CRM Online organization. You can obtain this from the Customizations >> Developer Resources page.
4) The code you added should now allow you to connect to CRM Online.
Web Resource Upload Tool (CRM SDK)
The Web Resource Upload Utility streamlines the task of uploading several files as Web Resources into Microsoft Dynamics CRM in a consistent manner.
Application: WebResourceUtility.exe
Solution: In the CRM SDK, the Visual Studio solution for this application is under \SDK\Tools\WebResourceUtility.
See the file Readme.docx that Microsoft includes with this utility. The information on this wiki page provides supplementary details.
The application is divided into three tabs (pages): Connections, Solutions and Web Resource Packages. (Note: It's best to maximize the main window of the utility in order to see all of the buttons, some of which appear at a fixed location at the bottom of the screen.)
Connections Tab
Connect to an existing Connection or create a new one.Connect to a CRM Online (Office 365) organization
See section "Fix: Connecting to Dynamics CRM 2013 Online (Office 365)" below for a change needed in the Web Resource application to support CRM Online. Follow those steps if your version of the utility cannot connect to CRM Online.Name: Enter a name that describes the connection and/or organization
Server: crm.dynamics.com
Organization: Obtain this value from CRM Online. Go to Settings >> Customizations >> Developer Resources and use the "Organization Unique Name".
Username: Provide the user name for a CRM user that has the administrator or customizer role
Domain: Leave this blank
Password: You are prompted to enter the password for the specified username
Solutions Tab
Choose a Dynamics CRM Unmanaged Solution.Select the Solution to which the Web Resources you upload will be associated.
If necessary, create a new Solution (in the CRM UI) for grouping the Web Resources you are working on. Add any existing Web Resources to the Solution that you intend to modify and update. If you create a new solution, return to the Connections tab and log in again to refresh the list of solutions.
Click the "Choose" button at the bottom of the list.
Web Resource Packages Tab
Load an existing package or create a new one.This screen lists existing "packages", if any. A package is a grouping of Web Resources and various settings.
Package Name: If it makes sense for your work, enter the same name as the Solution you selected on the Solutions tab, or a different name that describes the grouping of Web Resources. Note that you cannot enter spaces or dashes.
Root Path: Select the path where the Web Resource files reside on disk.
The "File Search" section lists files that are in the specified root path. This section allows you to find and select the files that you want to upload to CRM. Use the Add Files to Web Resources button to copy selected files to the list in the Web Resources section.
The "Web Resources" section provides a table of the Web Resources that you wish to create or update in CRM. Note the value for "Web Resource name prefix" -- be sure that prefix is what you expect.
For each file listed in the grid in the Web Resources section, set the following:
Fix: Connecting to Dynamics CRM Online (Office 365)
keywords: connect connection connectionsThe Web Resource Upload Utility code provided by Microsoft (up to and including the May 2014 SDK release) has CRM connectivity code that does not work with Dynamics CRM Online when provisioned with Microsoft Office 365. To resolve that issue you can change code in the project as shown below:
Class: public class ConsolelessServerConnection **Change this:** config.EndpointType = AuthenticationProviderType.LiveId; config.DiscoveryUri = new Uri(String.Format("https://dev.{0}/XRMServices/2011/Discovery.svc", config.ServerAddress)); config.DeviceCredentials = GetDeviceCredentials(); **To this:** config.EndpointType = AuthenticationProviderType.OnlineFederation; config.DiscoveryUri = new Uri(String.Format("https://disco.{0}/XRMServices/2011/Discovery.svc", config.ServerAddress)); //config.DeviceCredentials = GetDeviceCredentials();Alternative approach:
1) Open class file ConsolelessServerConnection. Change the first IF statement at the top of method GetServerConfiguration to what's shown below.
2) Build and run the Web Resource utility.
3) In the field that prompts for the server, include the entire Discovery service URL for your CRM Online organization. You can obtain this from the Customizations >> Developer Resources page.
4) The code you added should now allow you to connect to CRM Online.
public virtual ServerConnection.Configuration GetServerConfiguration(string server, string orgName, string user, string pw, string domain ) { config.ServerAddress = server; if (config.ServerAddress.EndsWith("Discovery.svc")) { config.DiscoveryUri = new Uri(config.ServerAddress); config.DeviceCredentials = GetDeviceCredentials(); ClientCredentials credentials = new ClientCredentials(); credentials.UserName.UserName = user; credentials.UserName.Password = pw; config.Credentials = credentials; config.OrganizationUri = GetOrganizationAddress(config.DiscoveryUri, orgName); }